package com.mit.common.manufacture.dto;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.mit.common.Constants;
import com.mit.common.dto.AbstractDTO;

public class MODTO extends AbstractDTO {

	private String code;
	private Integer styleId;
	private String styleCode;
	private String productName;
	private Integer productTypeId;
	private String productTypeName;
	private String sizeGroup;
	private Date creationDate;
	private Date deliverDate;
	private String img;
	private BigDecimal estimatedFee;
	private BigDecimal actualFee;
	private BigDecimal retailPrice;
	private BigDecimal wholesalePrice;
	private String remarks;
	private String state;
	private Integer factoryId;
	private String factoryName;
	private Integer orderQty;
	private Integer clipQty;
	private Integer deliverQty;
	//private BigDecimal totalAmt;
	private String s01;
	private String s02;
	private String s03;
	private String s04;
	private String s05;
	private String s06;
	private String s07;
	private String s08;
	private String s09;
	private String s10;	
	private Date crtDateFrom;
	private Date crtDateTo;
	
	private ArrayList<MOItemDTO> itemList;
	
	public MODTO(){
		itemList = new ArrayList<MOItemDTO>();
	}
	

	public List<String> getSizeFields() {
		ArrayList<String> rtn = new ArrayList<String>();
		if(Constants.DB_YES.equalsIgnoreCase(s01))
			rtn.add("s01");
		if(Constants.DB_YES.equalsIgnoreCase(s02))
			rtn.add("s02");
		if(Constants.DB_YES.equalsIgnoreCase(s03))
			rtn.add("s03");
		if(Constants.DB_YES.equalsIgnoreCase(s04))
			rtn.add("s04");
		if(Constants.DB_YES.equalsIgnoreCase(s05))
			rtn.add("s05");
		if(Constants.DB_YES.equalsIgnoreCase(s06))
			rtn.add("s06");
		if(Constants.DB_YES.equalsIgnoreCase(s07))
			rtn.add("s07");
		if(Constants.DB_YES.equalsIgnoreCase(s08))
			rtn.add("s08");
		if(Constants.DB_YES.equalsIgnoreCase(s09))
			rtn.add("s09");
		if(Constants.DB_YES.equalsIgnoreCase(s10))
			rtn.add("s10");		
		return rtn;
	}
	public void setSizeFields(List<String> sizeFields) {
				
		
		s01 = (sizeFields.contains("s01")) ? Constants.DB_YES   :Constants.DB_NO;
		s02 = (sizeFields.contains("s02")) ? Constants.DB_YES   :Constants.DB_NO;
		s03 = (sizeFields.contains("s03")) ? Constants.DB_YES   :Constants.DB_NO;
		s04 = (sizeFields.contains("s04")) ? Constants.DB_YES   :Constants.DB_NO;
		s05 = (sizeFields.contains("s05")) ? Constants.DB_YES   :Constants.DB_NO;
		s06 = (sizeFields.contains("s06")) ? Constants.DB_YES   :Constants.DB_NO;
		s07 = (sizeFields.contains("s07")) ? Constants.DB_YES   :Constants.DB_NO;
		s08 = (sizeFields.contains("s08")) ? Constants.DB_YES   :Constants.DB_NO;
		s09 = (sizeFields.contains("s09")) ? Constants.DB_YES   :Constants.DB_NO;
		s10 = (sizeFields.contains("s10")) ? Constants.DB_YES   :Constants.DB_NO;
	
	}


	public String getS01() {
		return s01;
	}


	public void setS01(String s01) {
		this.s01 = s01;
	}


	public String getS02() {
		return s02;
	}


	public void setS02(String s02) {
		this.s02 = s02;
	}


	public String getS03() {
		return s03;
	}


	public void setS03(String s03) {
		this.s03 = s03;
	}


	public String getS04() {
		return s04;
	}


	public void setS04(String s04) {
		this.s04 = s04;
	}


	public String getS05() {
		return s05;
	}


	public void setS05(String s05) {
		this.s05 = s05;
	}


	public String getS06() {
		return s06;
	}


	public void setS06(String s06) {
		this.s06 = s06;
	}


	public String getS07() {
		return s07;
	}


	public void setS07(String s07) {
		this.s07 = s07;
	}


	public String getS08() {
		return s08;
	}


	public void setS08(String s08) {
		this.s08 = s08;
	}


	public String getS09() {
		return s09;
	}


	public void setS09(String s09) {
		this.s09 = s09;
	}


	public String getS10() {
		return s10;
	}


	public void setS10(String s10) {
		this.s10 = s10;
	}


	public Integer getOrderQty() {
		return orderQty;
	}



	public String getSizeGroup() {
		return sizeGroup;
	}



	public void setSizeGroup(String sizeGroup) {
		this.sizeGroup = sizeGroup;
	}



	public String getImg() {
		return img;
	}



	public void setImg(String img) {
		this.img = img;
	}



	public void setOrderQty(Integer orderQty) {
		this.orderQty = orderQty;
	}



	public Integer getClipQty() {
		return clipQty;
	}



	public void setClipQty(Integer clipQty) {
		this.clipQty = clipQty;
	}



	public Integer getDeliverQty() {
		return deliverQty;
	}



	public void setDeliverQty(Integer deliverQty) {
		this.deliverQty = deliverQty;
	}



	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public Integer getStyleId() {
		return styleId;
	}
	public void setStyleId(Integer styleId) {
		this.styleId = styleId;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public Integer getProductTypeId() {
		return productTypeId;
	}
	public void setProductTypeId(Integer productTypeId) {
		this.productTypeId = productTypeId;
	}
	public String getProductTypeName() {
		return productTypeName;
	}
	public void setProductTypeName(String productTypeName) {
		this.productTypeName = productTypeName;
	}
	public Date getCreationDate() {
		return creationDate;
	}
	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}
	public Date getDeliverDate() {
		return deliverDate;
	}
	public void setDeliverDate(Date deliverDate) {
		this.deliverDate = deliverDate;
	}
	public BigDecimal getEstimatedFee() {
		return estimatedFee;
	}
	public void setEstimatedFee(BigDecimal estimatedFee) {
		this.estimatedFee = estimatedFee;
	}
	public BigDecimal getActualFee() {
		return actualFee;
	}
	public void setActualFee(BigDecimal actualFee) {
		this.actualFee = actualFee;
	}
	public BigDecimal getRetailPrice() {
		return retailPrice;
	}
	public void setRetailPrice(BigDecimal retailPrice) {
		this.retailPrice = retailPrice;
	}
	public BigDecimal getWholesalePrice() {
		return wholesalePrice;
	}
	public void setWholesalePrice(BigDecimal wholesalePrice) {
		this.wholesalePrice = wholesalePrice;
	}
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}

	public Integer getFactoryId() {
		return factoryId;
	}

	public void setFactoryId(Integer factoryId) {
		this.factoryId = factoryId;
	}

	public String getFactoryName() {
		return factoryName;
	}

	public void setFactoryName(String factoryName) {
		this.factoryName = factoryName;
	}

	public ArrayList<MOItemDTO> getItemList() {
		return itemList;
	}

	public void setItemList(ArrayList<MOItemDTO> itemList) {
		this.itemList = itemList;
	}

	public Date getCrtDateFrom() {
		return crtDateFrom;
	}

	public void setCrtDateFrom(Date crtDateFrom) {
		this.crtDateFrom = crtDateFrom;
	}

	public Date getCrtDateTo() {
		return crtDateTo;
	}

	public void setCrtDateTo(Date crtDateTo) {
		this.crtDateTo = crtDateTo;
	}

	public String getStyleCode() {
		return styleCode;
	}

	public void setStyleCode(String styleCode) {
		this.styleCode = styleCode;
	}



	
}
